
def main():
    import math
    for c in range(415, 500):
        sqr = math.sqrt(c**2+2000*c-1000**2)
        if abs(int(sqr)-sqr) < 1e-6:
            print c
            a = (1000-c-int(sqr)) / 2
            b = (1000-c+int(sqr)) / 2
            print a,b,c
            print c*1000*(500-c)
            print a*b*c
main()
